[env]
{{#protoc}}
PROTOC = "{{{protoc}}}"
{{/protoc}}
{{^isLinux}}
FFMPEG_DIR = "{{{nativeDeps}}}"
{{/isLinux}}

{{#isMacOS}}
[target.x86_64-apple-darwin]
rustflags = ["-L", "{{{nativeDeps}}}/lib"]

[target.x86_64-apple-darwin.heif]
rustc-link-search = ["{{{nativeDeps}}}/lib"]
rustc-link-lib = ["heif"]

[target.aarch64-apple-darwin]
rustflags = ["-L", "{{{nativeDeps}}}/lib"]

[target.aarch64-apple-darwin.heif]
rustc-link-search = ["{{{nativeDeps}}}/lib"]
rustc-link-lib = ["heif"]
{{/isMacOS}}

{{#isWin}}
[target.x86_64-pc-windows-msvc]
rustflags = ["-L", "{{{nativeDeps}}}\\lib"]

[target.x86_64-pc-windows-msvc.heif]
rustc-link-search = ["{{{nativeDeps}}}\\lib"]
rustc-link-lib = ["heif"]
{{/isWin}}

{{#isLinux}}
[target.x86_64-unknown-linux-gnu]
rustflags = ["-L", "{{{nativeDeps}}}/lib", "-C", "link-arg=-Wl,-rpath=${ORIGIN}/../lib/spacedrive"]

[target.x86_64-unknown-linux-gnu.heif]
rustc-link-search = ["{{{nativeDeps}}}/lib"]
rustc-link-lib = ["heif"]

[target.aarch64-unknown-linux-gnu]
rustflags = ["-L", "{{{nativeDeps}}}/lib", "-C", "link-arg=-Wl,-rpath=${ORIGIN}/../lib/spacedrive"]

[target.aarch64-unknown-linux-gnu.heif]
rustc-link-search = ["{{{nativeDeps}}}/lib"]
rustc-link-lib = ["heif"]
{{/isLinux}}

[alias]
prisma = "run -p prisma-cli --bin prisma --"
prisma-sync = "run -p prisma-cli --bin sync --"
